﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CodePlexNewReleaseChecker;

namespace SampleConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            VersionChecker vcReleasedPageStripper = new VersionChecker("servicemon", new ReleasedStripper());
            //VersionChecker vcRssFeed = new VersionChecker("servicemon", new RssFeedReleases());

            //get the release record for the version installed on the client (you'll need to track this in a config or base off of assembly version)
            Release client = vcReleasedPageStripper.GetReleaseByName("ServiceMon Release 0.9.0.82");
            //get the default release
            Release defaultRelease = vcReleasedPageStripper.GetDefaultRelease();
            //compare against the version installed on client (logic is up to you)
            if (defaultRelease.ReleaseDate > client.ReleaseDate)
            {
                //Notify user to upgrade
                var linkToDownload = defaultRelease.Link;
            }
        }
    }
}
